import React, { FC } from "react";
import { Typography } from "antd";
import { QuestionTitleType, QuestionTitleDefaultValue } from "./type";
const { Title } = Typography;
const QuestionTitleComponent: FC<QuestionTitleType> = (props) => {
  const { title = "", level = 1, iscenter = true } = { ...QuestionTitleDefaultValue, ...props };
  return (
    <Title level={level} style={{ textAlign: iscenter ? "center" : "start" }}>
      {title}
    </Title>
  );
};

export default QuestionTitleComponent;
